<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%

	Cookie[] cookies = request.getCookies();
	if(cookies != null){
		for(Cookie cookie : cookies){
		    if(cookie.getName().equals("JSESSIONID")){
		        System.out.println("JSESSIONID="+cookie.getValue());
		        break;
		    }
		}
	}
	
	//invalidate the session if exists
	session = request.getSession(false);
	System.out.println("User="+session.getAttribute("user"));
	if(session != null){
	    session.invalidate();
	    System.out.println("Session deleted");
	}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
	body {
		margin: 0;
		padding: 0; 
		background-image: url('boerse_grey2.jpg');
		background-attachment: fixed;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}
</style>
<title>Logout Page</title>


</head>

<body>

<h1>Logout</h1>

<h3>Sie haben sich erfolgreich abgemeldet.</h3>
<br />
<br />
Klicken Sie hier um sich erneut anzumelden:
<input type="button" value="Login" onClick="top.location.href='index.jsp'"></input>

</body>

</html>